const { contextBridge, ipcRenderer, shell } = require('electron')

contextBridge.exposeInMainWorld('electronAPI', {
  onUpdateLink: (callback) => ipcRenderer.on('update-link', callback),
  onUpdateFileRecive: (callback) => ipcRenderer.on('update-fileRecive', callback),
  getBroadCastInfo: () => ipcRenderer.invoke('getBroadCastInfo'),
  setBroadCastInfo: (data) => ipcRenderer.invoke('setBroadCastInfo', data),
  selectFiles: () => ipcRenderer.invoke('selectFiles'),
  sendFiles: (data) => ipcRenderer.invoke('sendFiles', data),
})